/*
 * @Author: 黄达全
 * @Date: 2024-07-19 15:10:36
 * @LastEditTime: 2024-08-18 18:30:48
 */
import * as elIcons from '@element-plus/icons-vue'
import type { App } from 'vue'
import config from "@/config"
import tool from "@/utils/tool"
import directives from "@/directives"
export default {
    install(app:App){
        // 挂载全局对象
        app.config.globalProperties.$config = config
        app.config.globalProperties.$tool = tool

       //统一注册el-icon图标
		for(let icon in elIcons){
			app.component(`ElIcon${icon}`, (elIcons as Record<string,any>)[icon])
		}
        for (const key in directives) {
            //@ts-ignore
            app.directive(key, directives[key])
          }
    },
  
}



